<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.validation.min.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/admincp.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.tooltip.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.cookie.js"></script>
<link href="{HEJIN_PATH}public/admin/css/skin_0.css" rel="stylesheet" type="text/css" id="cssfile2" />
<link href="{HEJIN_PATH}public/admin/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="{HEJIN_PATH}public/jscolor/jscolor.js"></script>
<link href="{HEJIN_PATH}public/datetimepicker/jquery.datetimepicker.css" rel="stylesheet" type="text/css"></link>
<script src="{HEJIN_PATH}public/datetimepicker/jquery.datetimepicker.js" type="text/javascript"></script>

<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
<div class="h3" style="width:auto;">{lang hejin_toupiao:votelist}</div>
      <ul class="tab-base">
        <li><a href="admin.php?action=plugins&operation=config&do={$_GET['do']}&identifier=hejin_toupiao&pmod=toupiao"><span>{lang hejin_toupiao:votelb}</span></a></li>
        <li><a href="admin.php?action=plugins&operation=config&do={$_GET['do']}&identifier=hejin_toupiao&pmod=toupiao&model=addvote" class="current"><span>{lang hejin_toupiao:addvote}</span></a></li>
      </ul>
    </div>
  </div>
  <form id="add_form" method="post" enctype="multipart/form-data" action="">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
    <table class="table tb-type2">
      <tbody>
        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_yuliua">{lang hejin_toupiao:votemoban}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><select id="class_type" name="yuliua">
                        <option value="1">{lang hejin_toupiao:mobana}</option>
                        <option value="2">{lang hejin_toupiao:mobanb}</option>
                        <option value="3">{lang hejin_toupiao:mobanc}</option>
                        <option value="4">{lang hejin_toupiao:moband}</option>
                        <option value="5">{lang hejin_toupiao:mobane}</option>
                        <option value="6">{lang hejin_toupiao:mobanf}</option>
                        <option value="7">{lang hejin_toupiao:mobang}</option>
                       <option value="8">{lang hejin_toupiao:mobanh}</option>
                      </select></td>
          <td class="vatop tips"></td>
        </tr>
      
        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_title">{lang hejin_toupiao:votename}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="title" id="class_name" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>


        <tr>
          <td colspan="2" class="required"><label class="validation" for="class_pic">{lang hejin_toupiao:tppic}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea id="pic" name="pic" style="width:400px;height:100px;"></textarea></td>
          <td class="vatop tips"><span class="vatop rowform">{lang hejin_toupiao:tppictsa}<br />{lang hejin_toupiao:tppictsb}<br /><a href="http://wx.weixinhj.com/hejin_toupiao/pic.html" target="_blank">{lang hejin_toupiao:yuanpicdown}</a></span></td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_content">{lang hejin_toupiao:wxname}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="content" id="class_content" class="txt"></td>
          <td class="vatop tips"></td>
        </tr>


        <tr>
          <td colspan="2" class="required"><label class="validation" for="class_icon">{lang hejin_toupiao:wxpic}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="icon" id="class_icon" class="txt"></td>
          <td class="vatop tips"><span class="vatop rowform">{lang hejin_toupiao:jianyicc}300px * 300px</span></td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_wxgzts">{lang hejin_toupiao:wxgzts}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea id="wxgzts" name="wxgzts" style="width:400px;height:100px;"></textarea></td>
          <td class="vatop tips"><a href="http://wx.weixinhj.com/hejin_toupiao/wxgzts.html" target="_blank">{lang hejin_toupiao:wxgztsa}</a></td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_wxgzurl">{lang hejin_toupiao:wxurl}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="wxgzurl" id="class_wxgzurl" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:wxurltsc}<br /><a href="http://wx.weixinhj.com/hejin_toupiao/wxurl.htm" target="_blank">{lang hejin_toupiao:wxurltsd}</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://i3.tietuku.com/c4d3f5658bfaea98.png" target="_blank">{lang hejin_toupiao:wxurltse}</a></td>
        </tr>






        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_tpnub">{lang hejin_toupiao:tpnub}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="tpnub" id="class_tpnub" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:tpnubts}</td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_ipnubs">{lang hejin_toupiao:ipnubs}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="ipnubs" id="class_ipnubs" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:ipnubsts}</td>
        </tr>


        
        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="start_time">{lang hejin_toupiao:starttime}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="start_time" id="start_time" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:starttimets}</td>
        </tr>
         <script>
  $('#start_time').datetimepicker({
	  });

  </script>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="over_time">{lang hejin_toupiao:bmendtime}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="over_time" id="over_time" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:bmendtimets}</td>
        </tr>
         <script>
  $('#over_time').datetimepicker({
	  });

  </script>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="vote_time">{lang hejin_toupiao:votetime}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="vote_time" id="vote_time" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:votetimets}</td>
        </tr>
         <script>
  $('#vote_time').datetimepicker({
	  });

  </script>



        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="end_time">{lang hejin_toupiao:endtime}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="end_time" id="end_time" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:endtimets}</td>
        </tr>
         <script>
  $('#end_time').datetimepicker({
	  });
  </script>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_yuliub">{lang hejin_toupiao:bmqtpsxz}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="0" name="yuliub" id="class_yuliub" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:bmqtpsxzts}</td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_shuomingta">{lang hejin_toupiao:shuomingta}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="shuomingta" id="class_shuomingta" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:shuomingtts}</td>
        </tr>

<tr>
          <td colspan="2" class="required"><label>{lang hejin_toupiao:shuomingca}</label>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wx.weixinhj.com/hejin_toupiao/huodongsm.htm" target="_blank">{lang hejin_toupiao:hdsmym}</a></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea id="shuomingca" name="shuomingca" style="width:700px;height:300px;visibility:hidden;"></textarea>
<script src="{HEJIN_PATH}public/kindeditor/kindeditor-min.js" charset="utf-8"></script>
<script src="{HEJIN_PATH}public/kindeditor/lang/zh_CN.js" charset="utf-8"></script>
<script>
	var KE;
  KindEditor.ready(function(K) {
        KE = K.create("textarea[name='shuomingca']", {
						items : ['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
            'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', '|', 'selectall', 'clearhtml','quickformat','|',
            'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
            'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'table', 'hr', 'emoticons', 'link', 'unlink', '|', 'about'],
						cssPath : "{HEJIN_PATH}public/kindeditor/themes/default/default.css",
						allowImageUpload : false,
						allowFlashUpload : false,
						allowMediaUpload : false,
						allowFileManager : false,
						filterMode: false,
						syncType:"form",
						afterCreate : function() {
							var self = this;
							self.sync();
						},
						afterChange : function() {
							var self = this;
							self.sync();
						},
						afterBlur : function() {
							var self = this;
							self.sync();
						}
        });
			KE.appendHtml = function(id,val) {
				this.html(this.html() + val);
				if (this.isCreated) {
					var cmd = this.cmd;
					cmd.range.selectNodeContents(cmd.doc.body).collapse(false);
					cmd.select();
				}
				return this;
			}
	});
</script>
	</td>
    <td class="vatop tips">{lang hejin_toupiao:shuomingcts}</td>
        </tr>



        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_shuomingtb">{lang hejin_toupiao:shuomingtb}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="shuomingtb" id="class_shuomingtb" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:shuomingtts}</td>
        </tr>

<tr>
          <td colspan="2" class="required"><label>{lang hejin_toupiao:shuomingcb}</label>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wx.weixinhj.com/hejin_toupiao/huodongsm.htm" target="_blank">{lang hejin_toupiao:hdsmym}</a></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea id="shuomingcb" name="shuomingcb" style="width:700px;height:300px;visibility:hidden;"></textarea>
<script src="{HEJIN_PATH}public/kindeditor/kindeditor-min.js" charset="utf-8"></script>
<script src="{HEJIN_PATH}public/kindeditor/lang/zh_CN.js" charset="utf-8"></script>
<script>
	var KE;
  KindEditor.ready(function(K) {
        KE = K.create("textarea[name='shuomingcb']", {
						items : ['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
            'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', '|', 'selectall', 'clearhtml','quickformat','|',
            'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
            'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'table', 'hr', 'emoticons', 'link', 'unlink', '|', 'about'],
						cssPath : "{HEJIN_PATH}public/kindeditor/themes/default/default.css",
						allowImageUpload : false,
						allowFlashUpload : false,
						allowMediaUpload : false,
						allowFileManager : false,
						filterMode: false,
						syncType:"form",
						afterCreate : function() {
							var self = this;
							self.sync();
						},
						afterChange : function() {
							var self = this;
							self.sync();
						},
						afterBlur : function() {
							var self = this;
							self.sync();
						}
        });
			KE.appendHtml = function(id,val) {
				this.html(this.html() + val);
				if (this.isCreated) {
					var cmd = this.cmd;
					cmd.range.selectNodeContents(cmd.doc.body).collapse(false);
					cmd.select();
				}
				return this;
			}
	});
</script>
	</td>
    <td class="vatop tips">{lang hejin_toupiao:shuomingcts}</td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_shuomingtc">{lang hejin_toupiao:shuomingtc}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="shuomingtc" id="class_shuomingtc" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:shuomingtts}</td>
        </tr>

<tr>
          <td colspan="2" class="required"><label>{lang hejin_toupiao:shuomingcc}</label>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://wx.weixinhj.com/hejin_toupiao/huodongsm.htm" target="_blank">{lang hejin_toupiao:hdsmym}</a></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea id="shuomingcc" name="shuomingcc" style="width:700px;height:300px;visibility:hidden;"></textarea>
<script src="{HEJIN_PATH}public/kindeditor/kindeditor-min.js" charset="utf-8"></script>
<script src="{HEJIN_PATH}public/kindeditor/lang/zh_CN.js" charset="utf-8"></script>
<script>
	var KE;
  KindEditor.ready(function(K) {
        KE = K.create("textarea[name='shuomingcc']", {
						items : ['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
            'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
            'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
            'superscript', '|', 'selectall', 'clearhtml','quickformat','|',
            'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
            'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'table', 'hr', 'emoticons', 'link', 'unlink', '|', 'about'],
						cssPath : "{HEJIN_PATH}public/kindeditor/themes/default/default.css",
						allowImageUpload : false,
						allowFlashUpload : false,
						allowMediaUpload : false,
						allowFileManager : false,
						filterMode: false,
						syncType:"form",
						afterCreate : function() {
							var self = this;
							self.sync();
						},
						afterChange : function() {
							var self = this;
							self.sync();
						},
						afterBlur : function() {
							var self = this;
							self.sync();
						}
        });
			KE.appendHtml = function(id,val) {
				this.html(this.html() + val);
				if (this.isCreated) {
					var cmd = this.cmd;
					cmd.range.selectNodeContents(cmd.doc.body).collapse(false);
					cmd.select();
				}
				return this;
			}
	});
</script>
	</td>
    <td class="vatop tips">{lang hejin_toupiao:shuomingcts}</td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_xnlls">{lang hejin_toupiao:xnclick}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="0" name="xnlls" id="class_xnlls" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:xnclickts}</td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_xntps">{lang hejin_toupiao:xntps}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="0" name="xntps" id="class_xntps" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:xntpsts}</td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_yuliuc">{lang hejin_toupiao:wufabmts}</label></td>
        </tr>

        <tr class="noborder">
          <td class="vatop rowform"><textarea name="yuliuc">{lang hejin_toupiao:wufabmtsa}</textarea></td>
          <td class="vatop tips"></td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_zpnamediy">{lang hejin_toupiao:signupname}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="zpnamediy" id="class_zpnamediy" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:signupnamets}</td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_zpmsdiy">{lang hejin_toupiao:signupms}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="zpmsdiy" id="class_zpmsdiy" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:signupmsts}</td>
        </tr>



        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_shenhe">{lang hejin_toupiao:shenhe}</label></td>
        </tr>

<tr style="background: none repeat scroll 0% 0% rgb(255, 255, 255);" class="noborder">
          <td class="vatop rowform onoff"><label for="openid1" class="cb-enable"><span>{lang hejin_toupiao:shi}</span></label>
            <label for="openid0" class="cb-disable selected"><span>{lang hejin_toupiao:fou}</span></label>
            <input id="openid1" name="is_sh" value="1" type="radio">
            <input id="openid0" name="is_sh" checked="checked" value="0" type="radio"></td>
          <td class="vatop tips"></td>
        </tr>

        <tr class="noborder">
          <td colspan="2" class="required"><label for="test_dlggk">{lang hejin_toupiao:dlggk}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="yuliud" id="class_yuliud" class="txt"></td>
          <td class="vatop tips">{lang hejin_toupiao:dlggkts}</td>
        </tr>


 
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"><input name="add_vote" class="btn" type="submit" value="{lang hejin_toupiao:baocun}" /></td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
$(document).ready(function(){




    $("#submit").click(function(){
        $("#add_form").submit();
    });

    $("input[nc_type='microshop_goods_class_image']").live("change", function(){
		var src = getFullPath($(this)[0]);
		$(this).parent().prev().find('.low_source').attr('src',src);
		$(this).parent().find('input[class="type-file-text"]').val($(this).val());
	});


    $('#add_form').validate({
        errorPlacement: function(error, element){
            error.appendTo(element.parent().parent().prev().find('td:first'));
        },
        success: function(label){
            label.addClass('valid');
        },
        rules : {
            title: {
                required : true,
                maxlength : 1000
            },
            pic: {
                required : true,
                maxlength : 1000
            },
            icon: {
                required : true,
                maxlength : 1000
            },
            content: {
                required : true,
                maxlength : 1000
            },
            tpnub: {
                required : true,
                digits: true,
                min: 1
            },
            ipnubs: {
                required : true,
                digits: true,
                min: 0
            },
            yuliub: {
                required : true,
                digits: true,
                min: 0
            },
            wxgzts: {
                required : true,
                maxlength : 1000
            },
            wxgzurl: {
                required : true,
                maxlength : 1000
            },
            xntps: {
                digits: true,
                min: 0
            },
            xnlls: {
                digits: true,
                min: 0
            },
            start_time: {
                required : true,
            },
            over_time: {
                required : true,
            },
            vote_time: {
                required : true,
            },
            end_time: {
                required : true,
            },
            yuliuc: {
                required : true,
                maxlength : 1000
            },
        },
        messages : {
            title: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
            pic: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
            icon: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
            content: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
            tpnub: {
                required : "{lang hejin_toupiao:addstmsga}",
                digits: "{lang hejin_toupiao:addstmsgf}",
                min : jQuery.validator.format("{lang hejin_toupiao:addstmsgg}1")
            },
            ipnubs: {
                required : "{lang hejin_toupiao:addstmsga}",
                digits: "{lang hejin_toupiao:addstmsgf}",
                min : jQuery.validator.format("{lang hejin_toupiao:addstmsgg}0")
            },
            yuliub: {
                required : "{lang hejin_toupiao:addstmsga}",
                digits: "{lang hejin_toupiao:addstmsgf}",
                min : jQuery.validator.format("{lang hejin_toupiao:addstmsgg}0")
            },
            wxgzts: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
            wxgzurl: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
            xntps: {
                digits: "{lang hejin_toupiao:addstmsgf}",
                min : jQuery.validator.format("{lang hejin_toupiao:addstmsgg}0")
            },
            xnlls: {
                digits: "{lang hejin_toupiao:addstmsgf}",
                min : jQuery.validator.format("{lang hejin_toupiao:addstmsgg}0")
            },
            start_time: {
                required : "{lang hejin_toupiao:addstmsga}",
            },
            yuliua: {
                required : "{lang hejin_toupiao:addstmsga}",
            },
            vote_time: {
                required : "{lang hejin_toupiao:addstmsga}",
            },
            end_time: {
                required : "{lang hejin_toupiao:addstmsga}",
            },
            yuliuc: {
                required : "{lang hejin_toupiao:addstmsga}",
                maxlength : jQuery.validator.format("{lang hejin_toupiao:addstmsgb}")
            },
        }
    });
});
</script> 
